#coding:utf-8
__author__ = 'aesop'

from functools import wraps
from flask import session, redirect


def is_loginn(fn):
    @wraps(fn)
    def __func(*args,**kwargs):
        if('stu_id' in session):
            return fn(*args, **kwargs)
        else:
            return redirect('/backstage/login')

    return __func